package com.lzhan.day16.TCPSOCKET;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
import java.net.UnknownHostException;

public class Client {

	public static void main(String[] args) {
		Socket socket;
		try {
			socket = new Socket("127.0.0.1",60000);
			BufferedReader bReader=new BufferedReader(new InputStreamReader(socket.getInputStream()));
			String res=bReader.readLine();
			System.out.println(res);
			bReader.close();
			socket.close();
			System.out.println("ok");
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

}
